<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="stylesheet" href="css/layui.css">
    <script src="layui.js"></script>
</head>
<body>
    <button class="layui-btn layui-btn-radius layui-btn-primary">这是一个按钮</button>
    <div style="width: 200px;height: 200px;border:1px solid"></div>

    <script>
        //JavaScript代码
        //鼠标移入div，修改div的背景颜色
        document.querySelector("div").onmouseenter = function () {
            //this.style.backgroundColor = "#fff000";
            this.style.display = "none"
        }
        document.querySelector("div").onmouseleave = function () {
            //this.style.backgroundColor = ""
            this.style.display = "block"
        }
        layui.use(['layer', 'form'], function(){
            var layer = layui.layer
                ,form = layui.form;
            layer.msg('Hello World');
        });
    </script>
</body>
</html>